﻿<%@ Page Language="C#" MasterPageFile="~/Template/List.master" AutoEventWireup="true"
    CodeFile="StatisticList.aspx.cs" Inherits="Car_StatisticList" Title="Untitled Page" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<%@ Register Src="~/Control/ListHeader.ascx" TagName="ListHeader" TagPrefix="wsc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script type="text/javascript">
        function getID(id) {
            document.getElementById('<%=tbSelectedID.ClientID %>').value = id;
        }


        function searchClick() {
            //alert(window.event.keyCode);
            if (window.event.keyCode == 13) {
                document.getElementById("<%=btnSearch.ClientID %>").click(); return false;
            }
            return true;
        }

        function clearText(control, text) {
            if (control.value == text)
                control.innerText = "";
        }
        function insertText(control, text) {
            if (control.value == "")
                control.innerText = text;
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitlePlaceHolder" runat="Server">
    申请统计列表
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ListToolBarPlaceHolder" runat="Server">
    <div style="display: none">
        <asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" />
        <asp:TextBox ID="tbSelectedID" runat="server"></asp:TextBox>
    </div>
    <table cellspacing="2" cellpadding="0" border="0" width="100%">
        <tr>
            <td class="ToolMenu" width="80">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)">
                    <%--<span>
                        <img src="<%=ResolveUrl("~/Images/Icon/Action/enable.gif")%>" alt="全部批准" /></span><span>全部批准</span>--%>
                    <asp:LinkButton runat="server" ID="ltbrnPrint" OnClick="Print_Click">
                    <span>
                        <img src="<%=ResolveUrl("~/Images/Icon/Action/import.gif")%>" alt="导出EXCEL" /></span><span>导出EXCEL</span></asp:LinkButton>
                </div>
            </td>
            <td>
                <table cellspacing="0" cellpadding="0" border="0" class="TableSearch" width="100%">
                    <tr>
                        <td width="100%">
                            <asp:TextBox ID="tbSearch" Style="width: 500px" runat="server" CssClass="TextBox"></asp:TextBox>
                        </td>
                        <td width="10">
                            <asp:LinkButton ID="btnSearch" runat="server" OnClick="btnSearch_Click"><img alt="<%=SearchDefaultText %>" src="../Images/Icon/Icon-Search.png" align="absmiddle" style="cursor: pointer;" /></asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="AdvancedSearchPlaceHolder" runat="Server">
    <table cellspacing="3" cellpadding="0" border="0" width="100%" style="display: none;">
        <tr>
            <td width="60">
                开始时间
            </td>
            <td width="200">
                <asp:TextBox ID="tbStartTime" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM'});"
                    class="Textbox01"></asp:TextBox>
            </td>
            <td width="60">
                结束时间
            </td>
            <td width="80">
                <asp:TextBox ID="tbEndTime" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM'});"
                    class="Textbox01"></asp:TextBox>
            </td>
            <td align="center">
                <asp:Button ID="btnAdvancedSearch" runat="server" CssClass="Button01" Text="查询" OnClientClick=""
                    OnClick="btnAdvancedSearch_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ListHeaderPlaceHolder" runat="Server">
    <div style="width: 100%; text-align: center;">
        <asp:Chart ID="Chart1" runat="server" Palette="BrightPastel" ImageType="Png" ImageUrl="~/TempImages/ChartPic_#SEQ(300,3)"
            BackColor="#D3DFF0" Width="600px" Height="300px" borderlinestyle="Solid" backgradienttype="TopBottom"
            BorderlineWidth="2" BorderlineColor="181, 64, 1" OnClick="Chart1_Click">
            <Titles>
                <asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 14.25pt, style=Bold" ShadowOffset="3"
                    Text="部门车辆分布图" Alignment="TopLeft" ForeColor="26, 59, 105" Name="Title1">
                </asp:Title>
            </Titles>
            <Legends>
                <asp:Legend Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold"
                    Enabled="False" TitleFont="Microsoft Sans Serif, 8pt, style=Bold">
                </asp:Legend>
            </Legends>
            <BorderSkin SkinStyle="Emboss"></BorderSkin>
            <Series>
                <asp:Series Name="总次数" BorderColor="180, 26, 59, 105">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid"
                    BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent"
                    BackGradientStyle="TopBottom">
                    <AxisY LineColor="64, 64, 64, 64" IsLabelAutoFit="False">
                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold"></LabelStyle>
                        <MajorGrid LineColor="64, 64, 64, 64"></MajorGrid>
                    </AxisY>
                    <AxisX LineColor="64, 64, 64, 64" IsLabelAutoFit="False">
                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold"></LabelStyle>
                        <MajorGrid LineColor="64, 64, 64, 64"></MajorGrid>
                    </AxisX>
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
    </div>
    <table cellspacing="0" cellpadding="0" border="0" class="PageGridHeader" width="100%">
        <%--   <wsc:ListHeader ID="lhGroupName" runat="server" Title="部门名称" Width="140" OrderColumn="GroupName"
            Align="center" />
        <wsc:ListHeader ID="lhVehicleName" runat="server" Title="车名" Width="80" OrderColumn="VehicleName"
            Align="center" />
        <wsc:ListHeader ID="lhVehicleNo" runat="server" Title="车牌号" Width="80" OrderColumn="VehicleNo"
            Align="center" />
        <wsc:ListHeader ID="lhSeatsCount" runat="server" Title="座位数" Width="80" OrderColumn="SeatsCount"
            Align="center" />--%>
        <wsc:ListHeader ID="ListHeader1" runat="server" Title="出发时间" Width="80" OrderColumn="StartDate"
            Align="center" />
        <wsc:ListHeader ID="ListHeader2" runat="server" Title="出发地点" Width="80" OrderColumn="StartAddress"
            Align="center" />
        <wsc:ListHeader ID="ListHeader4" runat="server" Title="目的地" Width="80" OrderColumn="Destination"
            Align="center" />
        <wsc:ListHeader ID="ListHeader3" runat="server" Title="事由" OrderColumn="Purpose"
            Align="center" />
        <wsc:ListHeader ID="ListHeader5" runat="server" Title="申请人" Width="80" OrderColumn="ApplicantName"
            Align="center" />
    </table>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="ListContentPlaceHolder" runat="Server">
    <div style="overflow-y: auto;" id="divStatic">
        <table id="Table1" width="100%" border="0" cellspacing="0" cellpadding="0" class="MainInfolist">
            <asp:Repeater ID="rptOrder" runat="server">
                <ItemTemplate>
                    <tr id="TableRow_<%# Container.ItemIndex%>" style="cursor: hand" class="Normal" oldclass="Normal"
                        onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)" onclick="getID(this.id);ClickChangeClass(this);">
                        <%--    <td width="140" align="center">
                            <%# DataBinder.Eval(Container.DataItem, "GroupName")%>
                        </td>
                        <td width="80" align="center">
                            <%# DataBinder.Eval(Container.DataItem, "VehicleName")%>
                        </td>
                        <td width="80" align="center">
                            <%# DataBinder.Eval(Container.DataItem, "VehicleNo")%>
                        </td>
                        <td width="80" align="center">
                            <%# DataBinder.Eval(Container.DataItem, "SeatsCount")%>
                        </td>--%>
                        <td width="80" align="center">
                            <%# DataBinder.Eval(Container.DataItem, "StartDate","{0:yyyy-MM-dd hh:mm:ss}")%>
                        </td>
                        <td width="80" align="center">
                            <%# DataBinder.Eval(Container.DataItem, "StartAddress")%>
                        </td>
                        <td width="80" align="center">
                            <%# DataBinder.Eval(Container.DataItem, "Destination")%>
                        </td>
                        <td align="left">
                            <%# DataBinder.Eval(Container.DataItem, "Purpose")%>
                        </td>
                        <td width="80" align="center">
                            <%# DataBinder.Eval(Container.DataItem, "ApplicantName")%>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
</asp:Content>
